<?php
/**
 * Desc: 首页
 * Created by xiejianwen@me.com
 * Date: 2016/10/9 17:43
 */

namespace app\index\controller;

use app\core\Controller;
use \think\Loader;
use \think\Session;
use app\index\service\WechatServer;

class Wechat extends Controller {
    public function __construct() {
        parent::__construct();
    }

    public function ajaxSignPackage() {
        //微信JSSDK
        $weixin   = new WechatServer();
        $sign_pkg = $weixin->getWeixinKmihlgSignPackage('', 'wx00772471671c607c', '6126c62f0d82771d7439e5880e7f0fb0');
        //var_dump($sign_pkg);die;
        $this->assign("sign_pkg", json_encode($sign_pkg));

        return $this->fetch('index/wechat');
    }

}
